<?php
/**
 * OaServiceOrder数据模型
 */
class OaServiceOrderTable {
	// 数据表模型配置
	public $config = [
			'name' => 'oa_service_order',
			'title' => '商品订单',
			'search_key' => '',
			'add_button' => 1,
			'del_button' => 1,
			'search_button' => 1,
			'check_all' => 1,
			'list_row' => 0,
			'addon' => 'OaSystem'
	];
	
	// 列表定义
	public $list_grid = [
			'order_no' => [
					'title' => '订单编号',
					'come_from' => 0,
					'width' => '',
					'is_sort' => 0,
					'name' => 'order_no',
					'function' => '',
					'href' => [ ]
			],
			'emp_name' => [
					'title' => '员工姓名',
					'come_from' => 0,
					'width' => '',
					'is_sort' => 0,
					'name' => 'emp_name',
					'function' => '',
					'href' => [ ]
			],
			'product' => [
					'title' => '预定商品',
					'come_from' => 0,
					'width' => '',
					'is_sort' => 0,
					'name' => 'product',
					'function' => '',
					'href' => [ ]
			],
			'num' => [
					'title' => '数量',
					'come_from' => 0,
					'width' => '',
					'is_sort' => 0,
					'name' => 'num',
					'function' => '',
					'href' => [ ]
			],
			'total' => [
					'title' => '总金额',
					'come_from' => 0,
					'width' => '',
					'is_sort' => 0,
					'name' => 'total',
					'function' => '',
					'href' => [ ]
			],
			'comment' => [
					'title' => '备注',
					'come_from' => 0,
					'width' => '',
					'is_sort' => 0,
					'name' => 'comment',
					'function' => '',
					'href' => [ ]
			],
			'time' => [
					'title' => '创建时间',
					'come_from' => 0,
					'width' => '',
					'is_sort' => 0,
					'name' => 'time',
					'function' => '',
					'href' => [ ]
			],
			'status' => [
					'title' => '状态',
					'come_from' => 0,
					'width' => '',
					'is_sort' => 0,
					'name' => 'status',
					'function' => '',
					'href' => [ ]
			],
			'urls' => [
					'title' => '操作',
					'come_from' => 1,
					'width' => '',
					'is_sort' => 0,
					'href' => [
							'0' => [
									'title' => '编辑',
									'url' => '[EDIT]'
							],
							'1' => [
									'title' => '删除',
									'url' => '[DELETE]'
							]
					],
					'name' => 'urls',
					'function' => ''
			]
	];
	
	// 字段定义
	public $fields = [
			'appid' => [
					'title' => '小程序appid',
					'field' => 'varchar(200) NOT NULL',
					'type' => 'string',
					'is_must' => 1,
					'placeholder' => '请输入内容'
			],
			'type' => [
					'title' => '订单类型',
					'type' => 'num',
					'field' => 'int(10) NULL',
					'remark' => '1:食堂菜品，2:小卖部，3:机票',
					'placeholder' => '请输入内容'
			],
			'emp_id' => [
					'title' => '员工ID',
					'type' => 'num',
					'field' => 'int(10) NOT NULL',
					'is_must' => 1,
					'placeholder' => '请输入内容'
			],
			'emp_name' => [
					'title' => '员工姓名',
					'field' => 'varchar(100) NULL',
					'type' => 'string',
					'placeholder' => '请输入内容'
			],
			'product' => [
					'title' => '预定商品',
					'field' => 'int(10) NULL',
					'type' => 'string',
					'placeholder' => '请输入内容'
			],
			'comment' => [
					'title' => '备注',
					'type' => 'string',
					'field' => 'varchar(512) NULL',
					'placeholder' => '请输入内容'
			],
			'time' => [
					'title' => '创建时间',
					'field' => 'int(10) NULL',
					'type' => 'string',
					'placeholder' => '请输入内容'
			],
			'is_del' => [
					'title' => '是否撤单',
					'field' => 'tinyint(2) NOT NULL',
					'type' => 'string',
					'is_must' => 1,
					'placeholder' => '请输入内容'
			],
			'status' => [
					'title' => '状态',
					'type' => 'num',
					'field' => 'int(10) NULL',
					'remark' => '0: 约定中，1:拒绝，2:预定被接受, 3:菜品未领走 4: 预定完成 5:订单取消 6:订单取消确认',
					'placeholder' => '请输入内容'
			],
			'deptid' => [
					'title' => '部门ID',
					'field' => 'int(10) NULL',
					'type' => 'string',
					'placeholder' => '请输入内容'
			],
			'num' => [
					'title' => '数量',
					'field' => 'int(10) NULL',
					'type' => 'string',
					'placeholder' => '请输入内容'
			],
			'total' => [
					'title' => '总金额',
					'field' => 'float(10,2) NULL',
					'type' => 'string',
					'placeholder' => '请输入内容'
			],
			'content' => [
					'title' => '内容',
					'type' => 'string',
					'field' => 'varchar(512) NULL',
					'is_show' => 1,
					'placeholder' => '请输入内容'
			],
			'order_no' => [
					'title' => '订单编号',
					'type' => 'string',
					'field' => 'varchar(255) NULL',
					'is_show' => 1,
					'placeholder' => '请输入内容'
			],
			'date' => [
					'title' => '预定日期',
					'type' => 'date',
					'field' => 'int(10) NULL',
					'is_show' => 1,
					'placeholder' => '请输入内容'
			],
			'end_date' => [
					'title' => '结束日期',
					'type' => 'date',
					'field' => 'int(10) NULL',
					'is_show' => 1,
					'placeholder' => '请输入内容'
			],
			's_addr' => [
					'title' => '出发地址',
					'type' => 'string',
					'field' => 'varchar(255) NULL',
					'is_show' => 1,
					'placeholder' => '请输入内容'
			],
			'e_addr' => [
					'title' => '目的地址',
					'type' => 'string',
					'field' => 'varchar(255) NULL',
					'is_show' => 1,
					'placeholder' => '请输入内容'
			],
			'stime' => [
					'title' => '出发时间段',
					'type' => 'string',
					'field' => 'varchar(20) NULL',
					'remark' => '上午，下午，晚上',
					'is_show' => 1,
					'placeholder' => '请输入内容'
			],
			'etime' => [
					'title' => '返回时间段',
					'type' => 'string',
					'field' => 'varchar(20) NULL',
					'remark' => '上午，下午，晚上',
					'is_show' => 1,
					'placeholder' => '请输入内容'
			],
			'idnum' => [
					'title' => '身份证',
					'type' => 'string',
					'field' => 'varchar(255) NULL',
					'is_show' => 1,
					'is_must' => 0
			]
	];
}	